<?php

/**
 * File: DingTalkMessage.class.php
 * Author: camy <375766145@qq.com>
 * Time: 2018/3/21 17:55
 */

namespace Common\Extend\DingTalk\Message;

class DingTalkMessage
{
    /**
     * handle-生成消息，发送消息
     * @param $type
     * @param $param
     */
    public static function handle($type, $name, $param)
    {
        $namespace = "\\Common\\Extend\\DingTalk\\Message\\" . $type;

        $class = $namespace . '\\' . ucfirst($name);
        $message = new  $class();
        $message->send($param);
    }

}